<template>
	<view class="page">
		<uv-navbar  
			:leftIconColor="navstyle.txtColor"
			:titleStyle="titleStyle"
			:title="navstyle.title"
			:leftIcon="navstyle.leftIcon"
			:bgColor="navstyle.bgColor"
			:fixed="false"
			@leftClick="leftClick"
			:safeAreaInsetTop="false">
		</uv-navbar>
		<view class="fontlist">
			<view class="rowHW">
				分享人
				<view >
					<text>{{userInfo.up_name}}</text>
				</view>
			</view>
			<view class="rowHW">
				我的UID
				<view>
					<text>{{userInfo.mobile}}</text>
				</view>
			</view>
			<view class="rowHW">
				手机号
				<view >
					<text>{{userInfo.mobile}}</text>
				</view>
			</view>
			<view class="rowHW" @click="setNameClick">
				姓名
				<view >
					<text>{{userInfo.nickname}}</text>
					<uv-icon name="arrow-right"></uv-icon>
				</view>
			</view>
			<!-- <view @click="emailClick" class="rowHW">
				邮箱
				<view >
					<text>{{userInfo.email}}</text>
					<uv-icon name="arrow-right"></uv-icon>
				</view>
			</view> -->
			<!-- <view  @click="passClick" class="rowHW">
				登录密码
				<view>
					<text>修改</text>
					<uv-icon name="arrow-right"></uv-icon>
				</view>
			</view>
			<view  @click="paypassClick" class="rowHW">
				支付密码
				<view > 5 一样 3 2
					<text>修改</text>
					<uv-icon name="arrow-right"></uv-icon>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	import {memberInfo} from '@/api/user.js';
	export default{
		data(){
			return{
				navstyle: {
					title: "账户管理",
					txtColor: "#333333",
					bgColor: "#FFFFFF",
					leftIcon: "arrow-left",
				},
				titleStyle: {
					fontWeight: 700
				},
				userInfo:{}
			}
		},
		onLoad() {
			memberInfo().then(response=>{
				this.userInfo = response.data;
				console.log(this.userInfo)
			});
			
		},
		methods:{
			leftClick() {
				uni.reLaunch({
				  url: '/pages/index/user' // 替换成上一页的路径
				});
			},
			setNameClick(){
				uni.navigateTo({
					url:'/pages/user/setname'
				})	
			},
			emailClick(){
				uni.navigateTo({
					url:'/pages/user/email'
				})	
			},
			passClick(){
				uni.navigateTo({
					url:'/pages/user/password'
				})	
			},
			paypassClick(){
				uni.navigateTo({
					url:'/pages/user/paypassword'
				})	
			}
		}
	}
</script>

<style>
	.page{
		width: 100%;
		height: 100%;
	    background-color: #fafafa;
	}
	.fontlist{
	    display: flex;
	    flex-direction: column;
	}
	.fontlist view{
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    background-color: #fff;
	    font-size: 14px;
	    color: #585858;
	}
	.rowHW{
	    padding: 15px 10px;
	    border-bottom: 1px solid #f1f1f1;
	}
	.rowHW text {
	    line-height: 24px;
	    color: #969696;
	    margin-right: 3px;
	}
</style>